Tobias Minich contributes the 'coto' format.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 27 Jul 2005 21:39:09 +0000 (21:39 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 27 Jul 2005 21:39:09 +0000 (21:39 +0000)
gpsbabel/Makefile
gpsbabel/README
gpsbabel/coto.c
gpsbabel/testo
gpsbabel/vecs.c

index 60c1e494e8981b3e402dc4ce88296b7eabeaa84f..ea49b19c6e5d941d283c122a31ea0f1db3c54c47 100644 (file)
@@ -36,7 +36,7 @@ FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin_tables.o \
        ozi.o nmea.o text.o html.o palmdoc.o netstumbler.o hsa_ndv.o \
        igc.o brauniger_iq.o shape.o hiketech.o glogbook.o coastexp.o \
        vcf.o overlay.o kml.o google.o lowranceusr.o an1.o tomtom.o \
-       tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o bcr.o
+       tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o bcr.o coto.o
 
 FILTERS=position.o duplicate.o arcdist.o polygon.o smplrout.o reverse_route.o sort.o stackfilter.o trackfilter.o dopfilt.o
 
index 1e6ac1a134a44f97187682c31d1a6aed6b708a58..12de958f7f0714b3ad86889fb5d1703bac56e8fc 100644 (file)
@@ -913,13 +913,37 @@ THE FORMATS
                 -F a_to_b.bcr
        
     OPENOFFICE
-       Tab seperated export-all (except geocahing data) file format. 
+       Tab seperated export-all (except geocaching data) file format. 
        Intended to serve as source for number-processing applications
        like OpenOffice, Ploticus and others. Tab was chosen as delimiter
        because it is a) supported by both OpenOffice and Ploticus and
        b) is not ',', so you can use 'sed -i "s/./,/g" <x>.csv' to adapt it to
        locales where ',' is used as decimal seperator.
        Contributed by Tobias Minich.
+       
+    COTO
+        Format for cotoGPS, a Palm GPS program. It can read both 
+       track and marker (waypoint) files. It is currently unable
+       to write track files, so only marker files can be written. The 
+       marker categories are written to and read from the icon 
+       description. The 'Not Assigned' category leaves the icon 
+       description empty on read. Currently geocache info is ignored.
+       
+       Options:
+       
+           trackname (input) - Name for the track. Defaults to 
+               the pdb name or file name if the pdb name is the default 
+               ('cotoGPS TrackDB'). This is currently (Coto Version 1.3.1) 
+               always the case.
+           zerocat (output) - Name for the Palm 'Not Assigned' category.
+               Defaults to 'Not Assigned'.
+           There is also a debugging option called 'internals' which 
+               takes a XCSV delimiter value. It writes some internal 
+               values (distance, arc, x and y) of the cotoGPS track 
+               format to the notes field.
+              
+       URL: http://core.de/~coto/projects/cotogps/
+       Contributed by Tobias Minich.
 
 DATA FILTERS
 
index 933cbc22f28b4bdef7efc2aabf7da22e01e0a86b..139c7ad4a6ea36c839da3928dc9747a78ca217b4 100644 (file)
@@ -322,9 +322,13 @@ coto_wpt_write(const waypoint *wpt)
        setshort_whitespace_ok(mkshort_wr_handle, 1);
        
        if ((global_opts.synthesize_shortnames && wpt->description) || (!wpt->shortname)) {
+#if 0
                if (wpt->shortname)
                        xfree(wpt->shortname);
                wpt->shortname = mkshort_from_wpt(mkshort_wr_handle, wpt);
+#else
+abort();
+#endif
        }
        if ((wpt->description) && ((strlen(wpt->description) > MAX_MARKER_NAME_LENGTH) || (strcmp(wpt->description, wpt->shortname)))) {
                if ((wpt->notes) && (strcmp(wpt->description, wpt->notes))) {
index 9c6f1547d561ca5235a6b1c49c6bac1b9d1b726b..98ddb611aba962423450e7afaa9f3c770691d81c 100755 (executable)
@@ -764,4 +764,29 @@ ${PNAME} -i glogbook -f reference/track/garmin_logbook.xml -o glogbook -F ${TMPD
 ${PNAME} -i glogbook -f ${TMPDIR}/glog.xml -o gpx -F ${TMPDIR}/glog2.gpx
 compare ${TMPDIR}/glog1.gpx ${TMPDIR}/glog2.gpx
 
+#
+# Dop filter test
+#
+rm -f ${TMPDIR}/dop*
+sed '/<hdop>50/d' reference/dop-test.gpx | ${PNAME} -i gpx -f - -o openoffice -F - | sed 's/RPT...//g' > ${TMPDIR}/dop-hdop.ref
+${PNAME} -i gpx -f reference/dop-test.gpx -x dop,hdop=50 -o openoffice -F - | sed 's/RPT...//g' > ${TMPDIR}/dop-hdop.fil
+compare ${TMPDIR}/dop-hdop.ref ${TMPDIR}/dop-hdop.fil
+sed '/<vdop>50/d' reference/dop-test.gpx | ${PNAME} -i gpx -f - -o openoffice -F - | sed 's/RPT...//g' > ${TMPDIR}/dop-vdop.ref
+${PNAME} -i gpx -f reference/dop-test.gpx -x dop,vdop=50 -o openoffice -F - | sed 's/RPT...//g' > ${TMPDIR}/dop-vdop.fil
+compare ${TMPDIR}/dop-vdop.ref ${TMPDIR}/dop-vdop.fil
+
+#
+# cotoGPS test
+#
+rm -f ${TMPDIR}/coto*
+# Track reading
+${PNAME} -i coto -f reference/cototesttrack.pdb -o openoffice -F ${TMPDIR}/cototrack.csv
+compare reference/cototesttrack.csv ${TMPDIR}/cototrack.csv
+# Marker read/write
+${PNAME} -i coto -f reference/cototestmarker.pdb -o openoffice -F ${TMPDIR}/cotomarker.csv
+${PNAME} -i gpx -f reference/cototestmarker.gpx -o openoffice -F ${TMPDIR}/cotomarkergpx.csv
+compare ${TMPDIR}/cotomarker.csv ${TMPDIR}/cotomarkergpx.csv
+${PNAME} -i gpx -f reference/cototestmarker.gpx -o coto -F ${TMPDIR}/cotomarker.pdb
+compare reference/cototestmarker.pdb ${TMPDIR}/cotomarker.pdb
+
 exit 0
index 831b00ebd3f318e25ce550878b9fb4fb1940d7ab..fd73811e1fa604bd5f5f53e79a1a33edc3d173f7 100644 (file)
@@ -85,6 +85,7 @@ extern ff_vecs_t ppdb_vecs;
 extern ff_vecs_t vitosmt_vecs;
 extern ff_vecs_t gdb_vecs;
 extern ff_vecs_t bcr_vecs;
+extern ff_vecs_t coto_vecs;
 
 static
 vecs_t vec_list[] = {
@@ -419,6 +420,12 @@ vecs_t vec_list[] = {
                "Motorrad Routenplaner (Map&Guide) .bcr files",
                "bcr"
        },      
+       {
+               &coto_vecs,
+               "coto",
+               "cotoGPS for PalmOS", 
+               NULL
+       },
        {
                NULL,
                NULL,